<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.6"/>
<title>IVF-HNSW: IndexIVF_HNSW_Grouping.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">IVF-HNSW
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.6 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Pages</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">IndexIVF_HNSW_Grouping.h</div>  </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="preprocessor">#ifndef IVF_HNSW_LIB_INDEXIVF_HNSW_GROUPING_H</span></div>
<div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define IVF_HNSW_LIB_INDEXIVF_HNSW_GROUPING_H</span></div>
<div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="preprocessor">#include &quot;IndexIVF_HNSW.h&quot;</span></div>
<div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;</div>
<div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="keyword">namespace </span>ivfhnsw{</div>
<div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;    <span class="comment">//=======================================</span></div>
<div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;    <span class="comment">// IVF_HNSW + Grouping( + Pruning) index</span></div>
<div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;    <span class="comment">//=======================================</span></div>
<div class="line"><a name="l00010"></a><span class="lineno"><a class="line" href="structivfhnsw_1_1IndexIVF__HNSW__Grouping.html">   10</a></span>&#160;    <span class="keyword">struct </span><a class="code" href="structivfhnsw_1_1IndexIVF__HNSW__Grouping.html">IndexIVF_HNSW_Grouping</a>: <a class="code" href="structivfhnsw_1_1IndexIVF__HNSW.html">IndexIVF_HNSW</a></div>
<div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;    {</div>
<div class="line"><a name="l00012"></a><span class="lineno"><a class="line" href="structivfhnsw_1_1IndexIVF__HNSW__Grouping.html#ad44707e8f2a79907872e152c7c7bedc0">   12</a></span>&#160;        <span class="keywordtype">size_t</span> <a class="code" href="structivfhnsw_1_1IndexIVF__HNSW__Grouping.html#ad44707e8f2a79907872e152c7c7bedc0">nsubc</a>;         </div>
<div class="line"><a name="l00013"></a><span class="lineno"><a class="line" href="structivfhnsw_1_1IndexIVF__HNSW__Grouping.html#a1a5ca7b0618e58131bf1bebd76bc0547">   13</a></span>&#160;        <span class="keywordtype">bool</span> <a class="code" href="structivfhnsw_1_1IndexIVF__HNSW__Grouping.html#a1a5ca7b0618e58131bf1bebd76bc0547">do_pruning</a>;      </div>
<div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;</div>
<div class="line"><a name="l00015"></a><span class="lineno"><a class="line" href="structivfhnsw_1_1IndexIVF__HNSW__Grouping.html#a3b0be75945927e8c187b4fda4b3abd12">   15</a></span>&#160;        std::vector&lt;std::vector&lt;idx_t&gt; &gt; <a class="code" href="structivfhnsw_1_1IndexIVF__HNSW__Grouping.html#a3b0be75945927e8c187b4fda4b3abd12">nn_centroid_idxs</a>;    </div>
<div class="line"><a name="l00016"></a><span class="lineno"><a class="line" href="structivfhnsw_1_1IndexIVF__HNSW__Grouping.html#a11c3fd0ab12ee9be4aec1bf44b8a5615">   16</a></span>&#160;        std::vector&lt;std::vector&lt;idx_t&gt; &gt; <a class="code" href="structivfhnsw_1_1IndexIVF__HNSW__Grouping.html#a11c3fd0ab12ee9be4aec1bf44b8a5615">subgroup_sizes</a>;      </div>
<div class="line"><a name="l00017"></a><span class="lineno"><a class="line" href="structivfhnsw_1_1IndexIVF__HNSW__Grouping.html#a54c5fa227e3c10eaec992e3af39b6e06">   17</a></span>&#160;        std::vector&lt;float&gt; <a class="code" href="structivfhnsw_1_1IndexIVF__HNSW__Grouping.html#a54c5fa227e3c10eaec992e3af39b6e06">alphas</a>;    </div>
<div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;</div>
<div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;    <span class="keyword">public</span>:</div>
<div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;        <a class="code" href="structivfhnsw_1_1IndexIVF__HNSW__Grouping.html">IndexIVF_HNSW_Grouping</a>(<span class="keywordtype">size_t</span> dim, <span class="keywordtype">size_t</span> ncentroids, <span class="keywordtype">size_t</span> bytes_per_code,</div>
<div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;                               <span class="keywordtype">size_t</span> nbits_per_idx, <span class="keywordtype">size_t</span> nsubcentroids);</div>
<div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;</div>
<div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;        <span class="keywordtype">void</span> <a class="code" href="structivfhnsw_1_1IndexIVF__HNSW__Grouping.html#a0d1842d6849fbab97bb2daf022f4a940">add_group</a>(<span class="keywordtype">size_t</span> group_idx, <span class="keywordtype">size_t</span> group_size, <span class="keyword">const</span> <span class="keywordtype">float</span> *x, <span class="keyword">const</span> <a class="code" href="structivfhnsw_1_1IndexIVF__HNSW.html#a7c6fb7b945eba6a48d28ea36db5809fc">idx_t</a> *<a class="code" href="structivfhnsw_1_1IndexIVF__HNSW.html#ad40193d01d98d4a55847638581d610bb">ids</a>);</div>
<div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;</div>
<div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;        <span class="keywordtype">void</span> <a class="code" href="structivfhnsw_1_1IndexIVF__HNSW__Grouping.html#a399996617a43e549ee886dcd57424b45">search</a>(<span class="keywordtype">size_t</span> k, <span class="keyword">const</span> <span class="keywordtype">float</span> *x, <span class="keywordtype">float</span> *distances, <span class="keywordtype">long</span> *labels);</div>
<div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;</div>
<div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;        <span class="keywordtype">void</span> <a class="code" href="structivfhnsw_1_1IndexIVF__HNSW__Grouping.html#a48a6813044ff0012b125297e272544ba">write</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> *path_index);</div>
<div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;        <span class="keywordtype">void</span> <a class="code" href="structivfhnsw_1_1IndexIVF__HNSW__Grouping.html#a8d41b41e32f6c6d93568d2accbd4e466">read</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> *path_index);</div>
<div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;</div>
<div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;        <span class="keywordtype">void</span> <a class="code" href="structivfhnsw_1_1IndexIVF__HNSW__Grouping.html#adebace156120602539d25e534887e570">train_pq</a>(<span class="keywordtype">size_t</span> n, <span class="keyword">const</span> <span class="keywordtype">float</span> *x);</div>
<div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;</div>
<div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;        <span class="keywordtype">void</span> <a class="code" href="structivfhnsw_1_1IndexIVF__HNSW__Grouping.html#a298361bf2adc2f2357c5b417e80d1611">compute_inter_centroid_dists</a>();</div>
<div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;</div>
<div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;    <span class="keyword">protected</span>:</div>
<div class="line"><a name="l00044"></a><span class="lineno"><a class="line" href="structivfhnsw_1_1IndexIVF__HNSW__Grouping.html#a93e52af13d1df43ad5c96a897317af72">   44</a></span>&#160;        std::vector&lt;float&gt; <a class="code" href="structivfhnsw_1_1IndexIVF__HNSW__Grouping.html#a93e52af13d1df43ad5c96a897317af72">query_centroid_dists</a>;</div>
<div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;</div>
<div class="line"><a name="l00047"></a><span class="lineno"><a class="line" href="structivfhnsw_1_1IndexIVF__HNSW__Grouping.html#ad5484dcaf72dcbaf324ac428b06327b0">   47</a></span>&#160;        std::vector&lt;std::vector&lt;float&gt;&gt; <a class="code" href="structivfhnsw_1_1IndexIVF__HNSW__Grouping.html#ad5484dcaf72dcbaf324ac428b06327b0">inter_centroid_dists</a>;</div>
<div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;</div>
<div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;    <span class="keyword">private</span>:</div>
<div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;        <span class="keywordtype">void</span> compute_residuals(<span class="keywordtype">size_t</span> n, <span class="keyword">const</span> <span class="keywordtype">float</span> *x, <span class="keywordtype">float</span> *residuals,</div>
<div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;                               <span class="keyword">const</span> <span class="keywordtype">float</span> *subcentroids, <span class="keyword">const</span> <a class="code" href="structivfhnsw_1_1IndexIVF__HNSW.html#a7c6fb7b945eba6a48d28ea36db5809fc">idx_t</a> *keys);</div>
<div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;</div>
<div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;        <span class="keywordtype">void</span> reconstruct(<span class="keywordtype">size_t</span> n, <span class="keywordtype">float</span> *x, <span class="keyword">const</span> <span class="keywordtype">float</span> *decoded_residuals,</div>
<div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;                         <span class="keyword">const</span> <span class="keywordtype">float</span> *subcentroids, <span class="keyword">const</span> <a class="code" href="structivfhnsw_1_1IndexIVF__HNSW.html#a7c6fb7b945eba6a48d28ea36db5809fc">idx_t</a> *keys);</div>
<div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;</div>
<div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;        <span class="keywordtype">void</span> compute_subcentroid_idxs(<a class="code" href="structivfhnsw_1_1IndexIVF__HNSW.html#a7c6fb7b945eba6a48d28ea36db5809fc">idx_t</a> *subcentroid_idxs, <span class="keyword">const</span> <span class="keywordtype">float</span> *subcentroids,</div>
<div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;                                      <span class="keyword">const</span> <span class="keywordtype">float</span> *points, <span class="keywordtype">size_t</span> group_size);</div>
<div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;</div>
<div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;        <span class="keywordtype">float</span> compute_alpha(<span class="keyword">const</span> <span class="keywordtype">float</span> *centroid_vectors, <span class="keyword">const</span> <span class="keywordtype">float</span> *points,</div>
<div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;                            <span class="keyword">const</span> <span class="keywordtype">float</span> *centroid, <span class="keyword">const</span> <span class="keywordtype">float</span> *centroid_vector_norms_L2sqr, <span class="keywordtype">size_t</span> group_size);</div>
<div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;    };</div>
<div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;}</div>
<div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;<span class="preprocessor">#endif //IVF_HNSW_LIB_INDEXIVF_HNSW_GROUPING_H</span></div>
<div class="ttc" id="structivfhnsw_1_1IndexIVF__HNSW__Grouping_html_a1a5ca7b0618e58131bf1bebd76bc0547"><div class="ttname"><a href="structivfhnsw_1_1IndexIVF__HNSW__Grouping.html#a1a5ca7b0618e58131bf1bebd76bc0547">ivfhnsw::IndexIVF_HNSW_Grouping::do_pruning</a></div><div class="ttdeci">bool do_pruning</div><div class="ttdoc">Turn on/off pruning. </div><div class="ttdef"><b>Definition:</b> IndexIVF_HNSW_Grouping.h:13</div></div>
<div class="ttc" id="structivfhnsw_1_1IndexIVF__HNSW_html_ad40193d01d98d4a55847638581d610bb"><div class="ttname"><a href="structivfhnsw_1_1IndexIVF__HNSW.html#ad40193d01d98d4a55847638581d610bb">ivfhnsw::IndexIVF_HNSW::ids</a></div><div class="ttdeci">std::vector&lt; std::vector&lt; idx_t &gt; &gt; ids</div><div class="ttdoc">Inverted lists for indexes. </div><div class="ttdef"><b>Definition:</b> IndexIVF_HNSW.h:60</div></div>
<div class="ttc" id="structivfhnsw_1_1IndexIVF__HNSW__Grouping_html_a3b0be75945927e8c187b4fda4b3abd12"><div class="ttname"><a href="structivfhnsw_1_1IndexIVF__HNSW__Grouping.html#a3b0be75945927e8c187b4fda4b3abd12">ivfhnsw::IndexIVF_HNSW_Grouping::nn_centroid_idxs</a></div><div class="ttdeci">std::vector&lt; std::vector&lt; idx_t &gt; &gt; nn_centroid_idxs</div><div class="ttdoc">Indices of the &lt;nsubc&gt; nearest centroids for each centroid. </div><div class="ttdef"><b>Definition:</b> IndexIVF_HNSW_Grouping.h:15</div></div>
<div class="ttc" id="structivfhnsw_1_1IndexIVF__HNSW__Grouping_html_a0d1842d6849fbab97bb2daf022f4a940"><div class="ttname"><a href="structivfhnsw_1_1IndexIVF__HNSW__Grouping.html#a0d1842d6849fbab97bb2daf022f4a940">ivfhnsw::IndexIVF_HNSW_Grouping::add_group</a></div><div class="ttdeci">void add_group(size_t group_idx, size_t group_size, const float *x, const idx_t *ids)</div><div class="ttdef"><b>Definition:</b> IndexIVF_HNSW_Grouping.cpp:21</div></div>
<div class="ttc" id="structivfhnsw_1_1IndexIVF__HNSW__Grouping_html_a11c3fd0ab12ee9be4aec1bf44b8a5615"><div class="ttname"><a href="structivfhnsw_1_1IndexIVF__HNSW__Grouping.html#a11c3fd0ab12ee9be4aec1bf44b8a5615">ivfhnsw::IndexIVF_HNSW_Grouping::subgroup_sizes</a></div><div class="ttdeci">std::vector&lt; std::vector&lt; idx_t &gt; &gt; subgroup_sizes</div><div class="ttdoc">Sizes of sub-groups for each group. </div><div class="ttdef"><b>Definition:</b> IndexIVF_HNSW_Grouping.h:16</div></div>
<div class="ttc" id="structivfhnsw_1_1IndexIVF__HNSW__Grouping_html_a399996617a43e549ee886dcd57424b45"><div class="ttname"><a href="structivfhnsw_1_1IndexIVF__HNSW__Grouping.html#a399996617a43e549ee886dcd57424b45">ivfhnsw::IndexIVF_HNSW_Grouping::search</a></div><div class="ttdeci">void search(size_t k, const float *x, float *distances, long *labels)</div><div class="ttdef"><b>Definition:</b> IndexIVF_HNSW_Grouping.cpp:159</div></div>
<div class="ttc" id="structivfhnsw_1_1IndexIVF__HNSW__Grouping_html_a54c5fa227e3c10eaec992e3af39b6e06"><div class="ttname"><a href="structivfhnsw_1_1IndexIVF__HNSW__Grouping.html#a54c5fa227e3c10eaec992e3af39b6e06">ivfhnsw::IndexIVF_HNSW_Grouping::alphas</a></div><div class="ttdeci">std::vector&lt; float &gt; alphas</div><div class="ttdoc">Coefficients that determine the location of sub-centroids. </div><div class="ttdef"><b>Definition:</b> IndexIVF_HNSW_Grouping.h:17</div></div>
<div class="ttc" id="structivfhnsw_1_1IndexIVF__HNSW_html"><div class="ttname"><a href="structivfhnsw_1_1IndexIVF__HNSW.html">ivfhnsw::IndexIVF_HNSW</a></div><div class="ttdef"><b>Definition:</b> IndexIVF_HNSW.h:42</div></div>
<div class="ttc" id="structivfhnsw_1_1IndexIVF__HNSW__Grouping_html_ad5484dcaf72dcbaf324ac428b06327b0"><div class="ttname"><a href="structivfhnsw_1_1IndexIVF__HNSW__Grouping.html#ad5484dcaf72dcbaf324ac428b06327b0">ivfhnsw::IndexIVF_HNSW_Grouping::inter_centroid_dists</a></div><div class="ttdeci">std::vector&lt; std::vector&lt; float &gt; &gt; inter_centroid_dists</div><div class="ttdoc">Distances between coarse centroids and their sub-centroids. </div><div class="ttdef"><b>Definition:</b> IndexIVF_HNSW_Grouping.h:47</div></div>
<div class="ttc" id="structivfhnsw_1_1IndexIVF__HNSW__Grouping_html_ad44707e8f2a79907872e152c7c7bedc0"><div class="ttname"><a href="structivfhnsw_1_1IndexIVF__HNSW__Grouping.html#ad44707e8f2a79907872e152c7c7bedc0">ivfhnsw::IndexIVF_HNSW_Grouping::nsubc</a></div><div class="ttdeci">size_t nsubc</div><div class="ttdoc">Number of sub-centroids per group. </div><div class="ttdef"><b>Definition:</b> IndexIVF_HNSW_Grouping.h:12</div></div>
<div class="ttc" id="structivfhnsw_1_1IndexIVF__HNSW__Grouping_html_adebace156120602539d25e534887e570"><div class="ttname"><a href="structivfhnsw_1_1IndexIVF__HNSW__Grouping.html#adebace156120602539d25e534887e570">ivfhnsw::IndexIVF_HNSW_Grouping::train_pq</a></div><div class="ttdeci">void train_pq(size_t n, const float *x)</div><div class="ttdef"><b>Definition:</b> IndexIVF_HNSW_Grouping.cpp:371</div></div>
<div class="ttc" id="structivfhnsw_1_1IndexIVF__HNSW__Grouping_html_a48a6813044ff0012b125297e272544ba"><div class="ttname"><a href="structivfhnsw_1_1IndexIVF__HNSW__Grouping.html#a48a6813044ff0012b125297e272544ba">ivfhnsw::IndexIVF_HNSW_Grouping::write</a></div><div class="ttdeci">void write(const char *path_index)</div><div class="ttdoc">Write index to the path. </div><div class="ttdef"><b>Definition:</b> IndexIVF_HNSW_Grouping.cpp:292</div></div>
<div class="ttc" id="structivfhnsw_1_1IndexIVF__HNSW__Grouping_html_a93e52af13d1df43ad5c96a897317af72"><div class="ttname"><a href="structivfhnsw_1_1IndexIVF__HNSW__Grouping.html#a93e52af13d1df43ad5c96a897317af72">ivfhnsw::IndexIVF_HNSW_Grouping::query_centroid_dists</a></div><div class="ttdeci">std::vector&lt; float &gt; query_centroid_dists</div><div class="ttdoc">Distances to the coarse centroids. Used for distance computation between a query and base points...</div><div class="ttdef"><b>Definition:</b> IndexIVF_HNSW_Grouping.h:44</div></div>
<div class="ttc" id="structivfhnsw_1_1IndexIVF__HNSW__Grouping_html"><div class="ttname"><a href="structivfhnsw_1_1IndexIVF__HNSW__Grouping.html">ivfhnsw::IndexIVF_HNSW_Grouping</a></div><div class="ttdef"><b>Definition:</b> IndexIVF_HNSW_Grouping.h:10</div></div>
<div class="ttc" id="structivfhnsw_1_1IndexIVF__HNSW__Grouping_html_a298361bf2adc2f2357c5b417e80d1611"><div class="ttname"><a href="structivfhnsw_1_1IndexIVF__HNSW__Grouping.html#a298361bf2adc2f2357c5b417e80d1611">ivfhnsw::IndexIVF_HNSW_Grouping::compute_inter_centroid_dists</a></div><div class="ttdeci">void compute_inter_centroid_dists()</div><div class="ttdoc">Compute distances between the group centroid and its &lt;subc&gt; nearest neighbors in the HNSW graph...</div><div class="ttdef"><b>Definition:</b> IndexIVF_HNSW_Grouping.cpp:505</div></div>
<div class="ttc" id="structivfhnsw_1_1IndexIVF__HNSW__Grouping_html_a8d41b41e32f6c6d93568d2accbd4e466"><div class="ttname"><a href="structivfhnsw_1_1IndexIVF__HNSW__Grouping.html#a8d41b41e32f6c6d93568d2accbd4e466">ivfhnsw::IndexIVF_HNSW_Grouping::read</a></div><div class="ttdeci">void read(const char *path_index)</div><div class="ttdoc">Read index from the path. </div><div class="ttdef"><b>Definition:</b> IndexIVF_HNSW_Grouping.cpp:331</div></div>
<div class="ttc" id="structivfhnsw_1_1IndexIVF__HNSW_html_a7c6fb7b945eba6a48d28ea36db5809fc"><div class="ttname"><a href="structivfhnsw_1_1IndexIVF__HNSW.html#a7c6fb7b945eba6a48d28ea36db5809fc">ivfhnsw::IndexIVF_HNSW::idx_t</a></div><div class="ttdeci">uint32_t idx_t</div><div class="ttdoc">all indices are this type </div><div class="ttdef"><b>Definition:</b> IndexIVF_HNSW.h:44</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Thu Feb 8 2018 16:55:50 for IVF-HNSW by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.6
</small></address>
</body>
</html>
